<?php

namespace IMooc;

class SizeDrawDecorator implements DrawDecorator
{
    protected string|int|float $size;

    function __construct($size = '14px')
    {
        $this->size = $size;
    }

    function beforeDraw(): void
    {
        echo "<div style='font-size: $this->size;'>";
    }

    function afterDraw(): void
    {
        echo "</div>";
    }
}